CRMFileBlock object

The CRMFileBlock object provides access to external files that are not part of the system. It allows these files to appear as if they are part of the system and to be called using ASP in the same way as any other Sage CRM page. You must format the appearance of the files in HTML.

Syntax to use this object:

var afile;
afile = CRM.GetBlock('file');
afile.FileName = 'general.htm';
afile.Translate = false;
afile.ProperCase = false;
afile.DirectoryPath = 'C:\\<Folder>\\<Subfolder>\\';
CRM.AddContent(afile.Execute());
Response.Write(CRM.GetPage());

You can use the Translate property which allows you to dynamically choose a file based on the user's language code, or the ProperCase property which allows you to display the text with initial caps. These simple ASP statements include the named file on the page. If the author sets translate to true, the file name included is changed from filename to filename_US or filename_DE, depending on the user's language specified in Sage CRM. If the file name extension is not specified, .txt is used by default. This means you must specify .htm and format the text.